<?php
/**
 *	Vista de un sector con sus vias
 *  */

include_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");

$sector_guid = get_input('sector_guid');
$auth = false;
//comprobando si existe y es un sector
if ($sector_guid){
	$sector = get_entity($sector_guid);
	$tipo = $sector->getSubtype();
	if (!strcmp('sector', $tipo)){
		$auth = true;
	}else
		forward(REFERER);
}else{
	forward(REFERER);
}

$escuela = get_entity($sector->escuela_guid);

$content = elgg_view('climbia/sector/full',array('entity' => $sector));


$sidebar .= "<h4>Escuela $escuela->title</h4>";

$body = elgg_view_layout('one_sidebar', array(
		'content' => $content,
		'sidebar' => $sidebar
));

// draw the page
echo elgg_view_page($sector->title, $body);


?>